package colopllet.colopl.pc.session;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ColoplSessionManagerImpl implements ColoplSessionManager {
    
    private Map<String, ColoplSession> map = new ConcurrentHashMap<String, ColoplSession>();
    
    public ColoplSessionManagerImpl() {
    }
    
    public void put(String id, ColoplSession session) {
        map.put(id, session);
    }

    public ColoplSession get(String id) {
        return (ColoplSession) map.get(id);
    }

    public void remove(String id) {
        map.remove(id);
    }

    public ColoplSession createSession(String username, String password) {
        ColoplSession session = new ColoplSessionImpl(username, password, null, null, null, null);
        return session;
    }

}
